<?php 
// 创建连接数据库所需的常量
define("HOST","localhost");
define("USERNAME","root");
define("PASSWORD","root");
define("DBNAME","Samsung");
// 创建mysql对象
$conn = @new mysqli(HOST,USERNAME,PASSWORD,DBNAME);

// 自定义连接失败错误
if($conn->connect_error){
  die("连接失败！！！");
}


?>